#ifndef RDICTIONARY_H
#define RDICTIONARY_H

/* Maximum size of the parts of words. */
#define MAX_PART_SIZE 5

/* Stores the number of words in root dictionary. */
int rdict_word_count;
/* Stores the number of marked words in root dictionary. */
int rdict_mark_count;

/*
 * Initializes the dictionary which stores all words and manages their parts.
 * The maximum number of words is 'max_words'.
 */
void rdict_init(int max_words);

/* Deletes the root dictionary. */
void rdict_delete();

/* Optimizes the root dictionary creating a index for each part of words. */
void rdict_optimize();

/*
 * Adds a word in the dictionary.
 * Automatically splits the word in parts and associates parts-words.
 */
void rdict_add(const char *word);

/* Marks the part of index 'index'. */
int rdict_mark(int index);

#endif /* RDICTIONARY_H */
